//
//@File    :	5.8_block.cpp
//@Time    :	2021/08/04 21:42:16
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	use a block statement
//

#include <iostream>

int main()
{
    using namespace std;
    cout<<"The Amazing Accounto will sum and average ";
    cout<<"five numbers for you.\n";
    cout<<"Please enter five values:\n";
    double number;
    double sum = 0.0;
    for (int i = 1; i <= 5; i++)
    {
        cout<<"Value "<<i<<": ";
        cin>>number;
        sum += number;
    }
    cout<<"Five exquisite chioces indeed! ";
    cout<<"They sum to "<<sum<< endl;
    cout<<"and average to "<<sum/5<<".\n";
    cout<<"The Amazing Accounto bids you adieu!\n";
    system("pause");
    return 0;
}